package com.luban;

import com.luban.qualifier.StrategyService;
import com.luban.service.UserService;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {

	public static void main(String[] args) {

		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

//		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
//		applicationContext.register(AppConfig.class);
//		// 设置必要环境变量
//		//applicationContext.getEnvironment().setRequiredProperties("myProperties");
//		applicationContext.refresh();

		applicationContext.getBean("userService", UserService.class).test();
		applicationContext.getBean("strategyService", StrategyService.class).test();

	}
}
